import java.io.UnsupportedEncodingException;
import java.util.Map;
import java.util.TreeMap;

import org.apache.commons.codec.digest.Sha2Crypt;

import com.alibaba.fastjson.JSONObject;

public class T {
	
	public static void main(String[] args) throws UnsupportedEncodingException {
		Map<String, String> params = new TreeMap<>();
		params.put("serverName", "eweq");
		params.put("version", "1.0");
		params.put("url", "3213123");
		String salt = "$5$sYWeCK65";
		System.out.println(salt);
		String jsonStr = JSONObject.toJSONString(params);
		System.out.println(jsonStr);
		String sign2 = Sha2Crypt.sha256Crypt(jsonStr.getBytes("UTF-8"), salt);
		System.out.println(sign2);
	}
}
